package com.phevos.knowledge.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Embeddable;

@Embeddable
public class AcceId extends BaseObject implements Serializable {
    /**
     * 
     */
    private static final long serialVersionUID = -8344998988462636270L;
    private Long acceId;
    private String SName;
    private String OName;


    @Column(name="acce_id", nullable=false)
    public Long getAcceId() {
        return this.acceId;
    }
    
    public void setAcceId(Long acceId) {
        this.acceId = acceId;
    }

    @Column(name="s_name", length=384)
    public String getSName() {
        return this.SName;
    }
    
    public void setSName(String SName) {
        this.SName = SName;
    }

    @Column(name="o_name", length=384)
    public String getOName() {
        return this.OName;
    }
    
    public void setOName(String OName) {
        this.OName = OName;
    }

    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        AcceId pojo = (AcceId) o;

        if (acceId != null ? !acceId.equals(pojo.acceId) : pojo.acceId != null) return false;
        if (SName != null ? !SName.equals(pojo.SName) : pojo.SName != null) return false;
        if (OName != null ? !OName.equals(pojo.OName) : pojo.OName != null) return false;

        return true;
    }

    public int hashCode() {
        int result = 0;
        result = 31 * result + (acceId != null ? acceId.hashCode() : 0);
        result = (SName != null ? SName.hashCode() : 0);
        result = 31 * result + (OName != null ? OName.hashCode() : 0);

        return result;
    }

    public String toString() {
        StringBuffer sb = new StringBuffer(getClass().getSimpleName());

        sb.append(" [");
        sb.append("acceId").append("='").append(getAcceId()).append("', ");
        sb.append("SName").append("='").append(getSName()).append("', ");
        sb.append("OName").append("='").append(getOName()).append("'");
        sb.append("]");
      
        return sb.toString();
    }

}
